package com.future.lock.me.entity.response;

import com.future.lock.common.http.response.HttpResponse;
import com.future.lock.find.bean.FindListBean;

import org.json.JSONArray;
import org.json.JSONException;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by jniu on 2017/11/27.
 */

public class FindListResponse extends HttpResponse {

    public List<FindListBean> data;

    @Override
    protected void parseData(String dataString) throws JSONException {
        data = new ArrayList<>();
        JSONArray array = new JSONArray(dataString);
        for (int i = 0; i < array.length(); i++) {
            FindListBean bean = new FindListBean();
            bean.parse(array.optJSONObject(i));
            data.add(bean);
        }
    }
}
